package com.qfedu.common.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * @Classname Lotteryrecord
 * @Description TODO
 * @Date 2025-10-09 10:57
 * @Created by 老任与码
 */
@Data
@TableName("lotteryrecord")
public class Lotteryrecord {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer uid;
    private Integer activityId;
    private Integer awardId;
    private Date createTime;
    private Date updateTime;

    public Lotteryrecord() {
    }

    public Lotteryrecord(RecordBuilder recordBuilder) {
        this.uid = recordBuilder.uid;
        this.activityId = recordBuilder.activityId;
        this.awardId = recordBuilder.awardId;
        this.createTime = recordBuilder.createTime;
        this.updateTime = recordBuilder.updateTime;
    }

    public static class RecordBuilder {
        private Integer uid;
        private Integer activityId;
        private Integer awardId;
        private Date createTime;
        private Date updateTime;

        public RecordBuilder activityId(Integer activityId) {
            this.activityId = activityId;
            return this;
        }

        public RecordBuilder awardId(Integer awardId) {
            this.awardId = awardId;
            return this;
        }

        public RecordBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public RecordBuilder createTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public RecordBuilder updateTime(Date updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public Lotteryrecord build() {
            return new Lotteryrecord(this);
        }
    }
}
